#ifndef __USERS_H
#define __USERS_H

typedef struct User 
{
	unsigned int usernumber;
	char username[12];
	char decorated_username[21];
	char firstName[21];
	char lastName[21];
	char phone[14];
	char preferredWidth;
	char preferredHeight;
	unsigned char passwordHash[17];
	unsigned char challengeAnswer[17];
	unsigned char securityLevel;
	unsigned int accessGroups;
	char isDeleted;
} user_t;

typedef struct UserIndexRecord
{
	int usernumber;
	char username[12];
} userIndexRec_t;

extern user_t _currentUser;

void initUser();
int loadUserByNumber(int userNumber, user_t *user);
int loadUserByName(char *userName, user_t *user);
int saveUser(user_t *user);
int getNextUserNumber(void);
#endif